typedef M3u8DownloadRecordState = String;

abstract class M3u8DownloadRecordStateEnum {
  static const waiting = 'waiting';
  static const success = 'success';
  static const error = 'error';
  static const cancel = 'cancel';

  static bool isWaiting(M3u8DownloadRecordState state) =>
      state == M3u8DownloadRecordStateEnum.waiting;
  static bool isFinished(M3u8DownloadRecordState state) =>
      isSuccess(state) || isError(state);
  static bool isSuccess(M3u8DownloadRecordState state) =>
      state == M3u8DownloadRecordStateEnum.success;
  static bool isError(M3u8DownloadRecordState state) =>
      state == M3u8DownloadRecordStateEnum.error;
  static bool isCancel(M3u8DownloadRecordState state) =>
      state == M3u8DownloadRecordStateEnum.cancel;
}
